﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="BugSysSolution.AjaxPaging.test" %>
<%@ Register TagPrefix="ajaxpage" Src="~/UserControls/AjaxPaging.ascx" TagName="Paging" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <table id="tab1">
        <thead>
            <tr>
                <td>姓名</td>
                <td>年龄</td>
                <td>地址</td>
            </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
    <ajaxpage:Paging ID="ajaxpaing" runat="server" />
    </form>
</body>
</html>
<script type="text/javascript">
    var undefined = window.undefined;
    var p = new ajaxpaging(3, $("#tab1"), "test1.aspx");
    SendAjax("get", "test1.aspx", { tag: 'getall', ran: Math.random() }, function (data) {
        data = [{ name: 'x1', age: '1', address: 'xxx' }, { name: 'x2', age: '2', address: 'xxx' }, { name: 'x3', age: '3', address: 'xxx' }, { name: 'x1', age: '1', address: 'xxx' }, { name: 'x2', age: '2', address: 'xxx' }, { name: 'x3', age: '3', address: 'xxx' }, { name: 'x1', age: '1', address: 'xxx' }, { name: 'x2', age: '2', address: 'xxx'}];
        p.Init(data);
    });
</script>